<%= form_for(@giveslecture) do |f| %>
  <% if @giveslecture.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@giveslecture.errors.count, "error") %> prohibited this giveslecture from being saved:</h2>

      <ul>
      <% @giveslecture.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :professor_id %><br />
    <%= f.collection_select(:professor_id, Professor.all, :id, :name) %>
  </div>
  <div class="field">
    <%= f.label :lecture_id %><br />
    <%#= f.number_field :lecture_id %>
    <%= f.collection_select(:lecture_id, Lecture.all, :id, :title) %>
  </div>


  
  <div class="actions">
    <%= f.submit %>
  </div>  
  
  
<% end %>
